Container migration and provisioning

ABSTRACT

Embodiments relate to container migration and provisioning. An aspect includes receiving a request to migrate a composite application to a container-based environment. Another aspect includes determining a plurality of software components that make up the composite application. Another aspect includes determining communications patterns between the plurality of software components. Another aspect includes determining a containerization plan for the composite application based on the determined communications patterns. Another aspect includes creating a plurality of containers, and communications channels between the plurality of containers, for the software components of the composite application based on the containerization plan.

BACKGROUND

The present invention relates generally to virtualized computerenvironments, and more specifically, to container migration andprovisioning.

Cloud computing makes extensive use of virtual machines (VMs), becauseVMs permit workloads to be isolated from one another and for theresource usage to be somewhat controlled. However, the extra levels ofabstraction, including the hypervisor, involved in VM-basedvirtualization may reduce workload performance, which is passed on tocustomers as worse price/performance. Once a hypervisor has addedoverhead, no higher layer can remove it. Such overheads then become apervasive tax on cloud workload performance. Container-basedvirtualization may simplify the deployment of virtualized applicationsas compared to VMs, while continuing to permit control of the resourcesallocated to different applications.

SUMMARY

Embodiments include a method, system, and computer program product forcontainer migration and provisioning. An aspect includes receiving arequest to migrate a composite application to a container-basedenvironment. Another aspect includes determining a plurality of softwarecomponents that make up the composite application. Another aspectincludes determining communications patterns between the plurality ofsoftware components. Another aspect includes determining acontainerization plan for the composite application based on thedetermined communications patterns. Another aspect includes creating aplurality of containers, and communications channels between theplurality of containers, for the software components of the compositeapplication based on the containerization plan.

BRIEF DESCRIPTION OF THE DRAWINGS

The subject matter which is regarded as embodiments is particularlypointed out and distinctly claimed in the claims at the conclusion ofthe specification. The forgoing and other features, and advantages ofthe embodiments are apparent from the following detailed descriptiontaken in conjunction with the accompanying drawings in which:

FIG. 1 depicts a cloud computing node according to an embodiment of thepresent invention;

FIG. 2 depicts a cloud computing environment according to an embodimentof the present invention;

FIG. 3 depicts abstraction model layers according to an embodiment ofthe present invention;

FIG. 4 depicts a system for container migration and provisioning inaccordance with an embodiment;

FIG. 5 depicts a process flow for generation of an application topologyfor container migration in accordance with an embodiment;

FIG. 6 depicts a process flow for container migration based on theapplication topology in accordance with an embodiment;

FIG. 7 depicts a process flow for collection of application analysisdata for container provisioning in accordance with an embodiment; and

FIG. 8 depicts a process flow for container provisioning in accordancewith an embodiment.

DETAILED DESCRIPTION

Embodiments of container migration and provisioning are provided, withexemplary embodiments being discussed below in detail. Containers areused in operating-system (OS) level virtualization to pack applicationsand the dependencies into relatively small, isolated virtualenvironments. Container deployment is application-centric. Eachcontainer packs one or more applications, or application components,with a slim version of the OS files and libraries that are required forthe application to operate. While new applications can be structuredwith containerization in mind, existing applications may also bemigrated to containers. However, manually migrating an existingapplication from a VM-based environment to a container-based environmentrequires core knowledge of the application. A container may be builtmanually, in which case a user must decide what applications will beincluded in the one or more containers of the application. For example,the user can pack a database application with a mail server applicationon top of a base image of Ubuntu™ in a single container. However,container packaging decisions may be relatively complex for compositeapplications, for example, cluster-based software such as a MapReduceframework. Embodiments of container migration may automatically examineapplication components and create one or more appropriate containers forthe application. Further, a container image repository may be updatedand managed based on collected application data, and the images in thecontainer image repository may be used for container provisioning.

In embodiments of container migration and provisioning, the analysis ofan existing application maps out the different components of theapplication and their relationships, producing a descriptor, which maybe an extensible markup language (XML) document in some embodiments,which describes the different components of the application, therelationships between those components (e.g., inter-componentcommunication patterns), and the underlying infrastructure statistics(e.g., average pairwise ping delays or network topology) of theapplication. The application descriptor is then used to containerize theapplication. A containerization plan is generated based on thedescriptor, and the containerization plan is executed by finding and/orcreating container images for the application components, and wiring thecontainers together based on the component layout.

In order to provision a container corresponding to an application, acontainer image is needed. Embodiments of container migration andprovisioning maintain a local, or private, container image repository,and may also communicate with one or more public container imagerepositories. The images in the local container repository are storedbased on monitoring of application packaging patterns in the localenvironment, and used to provide customized container imagerecommendations. In some embodiments, application packaging patterns arealso monitored across one or more other outside environments, andpublished in the public container image repository. The data from thepublic container image repository is also used to provide packagingrecommendations for the local container image repository. For complex,or composite, applications, there will be multiple ways to pack theapplication components. For example, if the user requests a Hadoopservice in a container format, all components, such as NameNode andDataNode, may be packed in a single container, or each component may bepackaged in an individual container and communicate with each other viacontainer networking. The user may be provided with one or morerecommendations for packaging the application into one or morecontainers, and the user may select a packaging scheme for theapplication based on the recommendations.

It is understood in advance that although this disclosure includes adetailed description on cloud computing, implementation of the teachingsrecited herein are not limited to a cloud computing environment. Rather,embodiments of the present invention are capable of being implemented inconjunction with any other type of computing environment now known orlater developed.

Cloud computing is a model of service delivery for enabling convenient,on-demand network access to a shared pool of configurable computingresources (e.g. networks, network bandwidth, servers, processing,memory, storage, applications, virtual machines, and services) that canbe rapidly provisioned and released with minimal management effort orinteraction with a provider of the service. This cloud model may includeat least five characteristics, at least three service models, and atleast four deployment models.

Characteristics are as follows:

On-demand self-service: a cloud consumer can unilaterally provisioncomputing capabilities, such as server time and network storage, asneeded automatically without requiring human interaction with theservice's provider.

Broad network access: capabilities are available over a network andaccessed through standard mechanisms that promote use by heterogeneousthin or thick client platforms (e.g., mobile phones, laptops, and PDAs).

Resource pooling: the provider's computing resources are pooled to servemultiple consumers using a multi-tenant model, with different physicaland virtual resources dynamically assigned and reassigned according todemand. There is a sense of location independence in that the consumergenerally has no control or knowledge over the exact location of theprovided resources but may be able to specify location at a higher levelof abstraction (e.g., country, state, or datacenter).

Rapid elasticity: capabilities can be rapidly and elasticallyprovisioned, in some cases automatically, to quickly scale out andrapidly released to quickly scale in. To the consumer, the capabilitiesavailable for provisioning often appear to be unlimited and can bepurchased in any quantity at any time.

Measured service: cloud systems automatically control and optimizeresource use by leveraging a metering capability at some level ofabstraction appropriate to the type of service (e.g., storage,processing, bandwidth, and active user accounts). Resource usage can bemonitored, controlled, and reported providing transparency for both theprovider and consumer of the utilized service.

Service Models are as follows:

Software as a Service (SaaS): the capability provided to the consumer isto use the provider's applications running on a cloud infrastructure.The applications are accessible from various client devices through athin client interface such as a web browser (e.g., web-based e-mail).The consumer does not manage or control the underlying cloudinfrastructure including network, servers, operating systems, storage,or even individual application capabilities, with the possible exceptionof limited user-specific application configuration settings.

Platform as a Service (PaaS): the capability provided to the consumer isto deploy onto the cloud infrastructure consumer-created or acquiredapplications created using programming languages and tools supported bythe provider. The consumer does not manage or control the underlyingcloud infrastructure including networks, servers, operating systems, orstorage, but has control over the deployed applications and possiblyapplication hosting environment configurations.

Infrastructure as a Service (IaaS): the capability provided to theconsumer is to provision processing, storage, networks, and otherfundamental computing resources where the consumer is able to deploy andrun arbitrary software, which can include operating systems andapplications. The consumer does not manage or control the underlyingcloud infrastructure but has control over operating systems, storage,deployed applications, and possibly limited control of select networkingcomponents (e.g., host firewalls).

Deployment Models are as follows:

Private cloud: the cloud infrastructure is operated solely for anorganization. It may be managed by the organization or a third party andmay exist on-premises or off-premises.

Community cloud: the cloud infrastructure is shared by severalorganizations and supports a specific community that has shared concerns(e.g., mission, security requirements, policy, and complianceconsiderations). It may be managed by the organizations or a third partyand may exist on-premises or off-premises.

Public cloud: the cloud infrastructure is made available to the generalpublic or a large industry group and is owned by an organization sellingcloud services.

Hybrid cloud: the cloud infrastructure is a composition of two or moreclouds (private, community, or public) that remain unique entities butare bound together by standardized or proprietary technology thatenables data and application portability (e.g., cloud bursting forload-balancing between clouds).

A cloud computing environment is service oriented with a focus onstatelessness, low coupling, modularity, and semantic interoperability.At the heart of cloud computing is an infrastructure comprising anetwork of interconnected nodes.

Referring now to FIG. 1, a schematic of an example of a cloud computingnode is shown. Cloud computing node 10 is only one example of a suitablecloud computing node and is not intended to suggest any limitation as tothe scope of use or functionality of embodiments of the inventiondescribed herein. Regardless, cloud computing node 10 is capable ofbeing implemented and/or performing any of the functionality set forthhereinabove.

In cloud computing node 10 there is a computer system/server 12, whichis operational with numerous other general purpose or special purposecomputing system environments or configurations. Examples of well-knowncomputing systems, environments, and/or configurations that may besuitable for use with computer system/server 12 include, but are notlimited to, personal computer systems, server computer systems, thinclients, thick clients, hand-held or laptop devices, multiprocessorsystems, microprocessor-based systems, set top boxes, programmableconsumer electronics, network PCs, minicomputer systems, mainframecomputer systems, and distributed cloud computing environments thatinclude any of the above systems or devices, and the like.

Computer system/server 12 may be described in the general context ofcomputer system-executable instructions, such as program modules, beingexecuted by a computer system. Generally, program modules may includeroutines, programs, objects, components, logic, data structures, and soon that perform particular tasks or implement particular abstract datatypes. Computer system/server 12 may be practiced in distributed cloudcomputing environments where tasks are performed by remote processingdevices that are linked through a communications network. In adistributed cloud computing environment, program modules may be locatedin both local and remote computer system storage media including memorystorage devices.

As shown in FIG. 1, computer system/server 12 in cloud computing node 10is shown in the form of a general-purpose computing device. Thecomponents of computer system/server 12 may include, but are not limitedto, one or more processors or processing units 16, a system memory 28,and a bus 18 that couples various system components including systemmemory 28 to processor 16.

Bus 18 represents one or more of any of several types of bus structures,including a memory bus or memory controller, a peripheral bus, anaccelerated graphics port, and a processor or local bus using any of avariety of bus architectures. By way of example, and not limitation,such architectures include Industry Standard Architecture (ISA) bus,Micro Channel Architecture (MCA) bus, Enhanced ISA (EISA) bus, VideoElectronics Standards Association (VESA) local bus, and PeripheralComponent Interconnect (PCI) bus.

Computer system/server 12 typically includes a variety of computersystem readable media. Such media may be any available media that isaccessible by computer system/server 12, and it includes both volatileand non-volatile media, removable and non-removable media.

System memory 28 can include computer system readable media in the formof volatile memory, such as random access memory (RAM) 30 and/or cachememory 32. Computer system/server 12 may further include otherremovable/non-removable, volatile/non-volatile computer system storagemedia. By way of example only, storage system 34 can be provided forreading from and writing to a non-removable, non-volatile magnetic media(not shown and typically called a “hard drive”). Although not shown, amagnetic disk drive for reading from and writing to a removable,non-volatile magnetic disk (e.g., a “floppy disk”), and an optical diskdrive for reading from or writing to a removable, non-volatile opticaldisk such as a CD-ROM, DVD-ROM or other optical media can be provided.In such instances, each can be connected to bus 18 by one or more datamedia interfaces. As will be further depicted and described below,memory 28 may include at least one program product having a set (e.g.,at least one) of program modules that are configured to carry out thefunctions of embodiments of the invention.

Program/utility 40, having a set (at least one) of program modules 42,may be stored in memory 28 by way of example, and not limitation, aswell as an operating system, one or more application programs, otherprogram modules, and program data. Each of the operating system, one ormore application programs, other program modules, and program data orsome combination thereof, may include an implementation of a networkingenvironment. Program modules 42 generally carry out the functions and/ormethodologies of embodiments of the invention as described herein.

Computer system/server 12 may also communicate with one or more externaldevices 14 such as a keyboard, a pointing device, a display 24, etc.;one or more devices that enable a user to interact with computersystem/server 12; and/or any devices (e.g., network card, modem, etc.)that enable computer system/server 12 to communicate with one or moreother computing devices. Such communication can occur via Input/Output(I/O) interfaces 22. Still yet, computer system/server 12 cancommunicate with one or more networks such as a local area network(LAN), a general wide area network (WAN), and/or a public network (e.g.,the Internet) via network adapter 20. As depicted, network adapter 20communicates with the other components of computer system/server 12 viabus 18. It should be understood that although not shown, other hardwareand/or software components could be used in conjunction with computersystem/server 12. Examples, include, but are not limited to: microcode,device drivers, redundant processing units, external disk drive arrays,RAID systems, tape drives, and data archival storage systems, etc.

Referring now to FIG. 2, illustrative cloud computing environment 50 isdepicted. As shown, cloud computing environment50 comprises one or morecloud computing nodes 10 with which local computing devices used bycloud consumers, such as, for example, personal digital assistant (PDA)or cellular telephone 54A, desktop computer 54B, laptop computer 54C,and/or automobile computer system 54N may communicate. Nodes 10 maycommunicate with one another. They may be grouped (not shown) physicallyor virtually, in one or more networks, such as Private, Community,Public, or Hybrid clouds as described hereinabove, or a combinationthereof. This allows cloud computing environment 50 to offerinfrastructure, platforms and/or software as services for which a cloudconsumer does not need to maintain resources on a local computingdevice. It is understood that the types of computing devices 54A-N shownin FIG. 2 are intended to be illustrative only and that computing nodes10 and cloud computing environment 50 can communicate with any type ofcomputerized device over any type of network and/or network addressableconnection (e.g., using a web browser).

Referring now to FIG. 3, a set of functional abstraction layers providedby cloud computing environment 50 (FIG. 2) is shown. It should beunderstood in advance that the components, layers, and functions shownin FIG. 3 are intended to be illustrative only and embodiments of theinvention are not limited thereto. As depicted, the following layers andcorresponding functions are provided:

Hardware and software layer 60 includes hardware and softwarecomponents. Examples of hardware components include mainframes, in oneexample IBM® zSeries® systems; RISC (Reduced Instruction Set Computer)architecture based servers, in one example IBM pSeries® systems; IBMxSeries® systems; IBM BladeCenter® systems; storage devices; networksand networking components. Examples of software components includenetwork application server software, in one example IBM WebSphere®application server software; and database software, in one example IBMDB2®database software. (IBM, zSeries, pSeries, xSeries, BladeCenter,WebSphere, and DB2 are trademarks of International Business MachinesCorporation registered in many jurisdictions worldwide).

Virtualization layer 62 provides an abstraction layer from which thefollowing examples of virtual entities may be provided: virtual servers;virtual storage; virtual networks, including virtual private networks;virtual applications and operating systems; and virtual clients.Virtualization layer 62 also includes container management software,including container migration and provisioning in accordance withvarious embodiments that are discussed below.

In one example, management layer 64 may provide the functions describedbelow. Resource provisioning provides dynamic procurement of computingresources and other resources that are utilized to perform tasks withinthe cloud computing environment. Metering and Pricing provide costtracking as resources are utilized within the cloud computingenvironment, and billing or invoicing for consumption of theseresources. In one example, these resources may comprise applicationsoftware licenses. Security provides identity verification for cloudconsumers and tasks, as well as protection for data and other resources.User portal provides access to the cloud computing environment forconsumers and system administrators. Service level management providescloud computing resource allocation and management such that requiredservice levels are met. Service Level Agreement (SLA) planning andfulfillment provide pre-arrangement for, and procurement of, cloudcomputing resources for which a future requirement is anticipated inaccordance with an SLA.

Workloads layer 66 provides examples of functionality for which thecloud computing environment may be utilized. Examples of workloads andfunctions which may be provided from this layer include: mapping andnavigation; software development and lifecycle management; virtualclassroom education delivery; data analytics processing; and transactionprocessing.

FIG. 4 depicts an embodiment of a system 400 for container migration andprovisioning. System 400 may comprise a data center that may be usedfor, for example, provisioning of cloud services, and includes acontainer management server 401 that is in communication with aplurality of computer systems 407A-N, which may also be referred to asnodes. The container management server 401 includes a containermigration module 402, and a container provisioning module 404. Thecontainer migration module 402 includes an application analyzer 403A,and containerization planner 403B, and a plan executor 403C. Thecontainer management server is further in communication with a public,or global, container image repository 405, and a private container imagerepository 406. The computer systems 407A-B each host one or morecontainers, such as containers 411A-N and containers 4113A-N, that wereprovisioned by the container management server 401. Each computer systemsuch as computer systems 407A-N includes a host operating system 408A-Nand a container manager 409A-N that runs on top of the operating system408A-N. The container manager 409A-N hosts a plurality of containerimages, such as images 410A-N and 412A-N, that each host one or morecontainers such as containers 411A-N and 413A-N. FIG. 4 is shown forillustrative purposes only; a system 400 may include any appropriatenumber of container management servers, computer systems, and containerimage repositories. Further, each of the computer system may host anyappropriate number of containers in various embodiments. Further, thevarious elements of a system such as system 400, such as the containermanagement server, computer systems, and container image repositories,may be interconnected and communicate in any appropriate manner.Further, in some embodiments, containers such as containers 411A-N and413A-N may be provisioned in one or more nodes that comprise VMs.Further, any appropriate number of physical machines that are runningany appropriate number of VMs and/or containers may be included insystem 400.

In container migration module 402, application analyzer 403A maygenerate an application descriptor for an application to be migrated,and then containerization planner 403B may generate a list of containerswith associated packaging strategies for the application, using theapplication descriptor and a set of predefined packaging policy, e.g.,two or more containers should be merged into one container if theirassociated application components communicate frequently (e.g., aexceeding predefined threshold). In some embodiments, the applicationdescriptor may be generated based on prior experience with theapplication being migrated, e.g., a best practice knowledge base, orapplication data may be provided by a user in, for example, an XMLformat. In various embodiments, the application descriptor may begenerated based on any appropriate composite application monitoring anddiagnosis tools. In some embodiments, user-provided infrastructurecharacteristics (e.g., machine ping statistics or layout) may be used todetermine the container packaging strategy (e.g., if pairwise latencybetween nodes exceeds a predetermined threshold, a bin-packing strategymay be used to pack all components into a reduced number of containers,subject to resource constraints). Container migration module 402 isdiscussed in further detail below with respect to FIGS. 5-6.

Container provisioning module 404 may recommend application packagingstrategies in a system 400 comprising a container-based virtualizationservice environment. The container provisioning module 404 may monitorand store data regarding most common application component packagingstrategies for any appropriate types of applications across multipleenvironments. The container provisioning module 404 may also monitor andstore data regarding communication patterns and latency betweenapplication components within the local data center. When a newapplication container is requested by a user, the container provisioningmodule may retrieve information regarding common application componentpackaging strategies for the application across multiple environments.In some embodiments, the user may be presented with various options forpackaging the application, including a determined common packagingstrategy and a default packaging strategy, and the user may select apreferred packaging strategy. A packaging strategy may be recommended tothe user based on the stored communication pattern and latency datausing predefined rules, e.g., pack components with relatively frequentcommunications and high latency (e.g., as compared to variousthresholds) in single container. Rule-based application componenttraffic pattern best practices may also be consulted to estimatecommunication patterns and latency levels for an application. Forexample, for packaging of a Hadoop container, for file system access,NameNode will be a bottleneck and it thus would be beneficial to packageDataNode and NameNode in a container together for relatively fasttesting of input/output (I/O) intensive jobs. Other application-specificbest practice rules may be applied in various embodiments. Containerprovisioning module 104 is discussed in further detail below withrespect to FIGS. 7-8.

FIG. 5 depicts an embodiment of a method 500 for generation of anapplication topology for container migration in accordance with anembodiment. Method 500 may be implemented in application analyzer 403Ain container migration module 402 in in container management server 401of FIG. 4. In block 501, the container migration module 402 receives arequest to migrate a distributed application from, for example, aVM-based environment to a container-based environment. Next, in block502, the application analyzer 403A identifies the components of theapplication, and the particular nodes (e.g., computer systems in thedata center such as system 400) upon which the various components arerunning. Some embodiments of applications may be single-node basedapplications, while other embodiments of applications may be morecomplex, distributed applications spanning multiple nodes of the datacenter. The application analyzer 403A determines all nodes in the system400 that are involved in the application, i.e., where any component ofthe application is running. Examples of component software of a singledistributed application that may be distributed among various nodesinclude International Business Machines™ (IBM) Websphere™ on a mainnode, IBM hypertext transfer protocol (HTTP) Server™ on a remote host,IBM Websphere Message Queue (WMQ)™ on another host, and database2 (DB2)™on yet another host. Some further examples of application componentsthat may be identified by the application analysis are operating systemssuch as Linux™, and Apache Web Server™, My structured query language(MySQL), and/or PHP Hypertext Processor (PHP). In various embodiments ofblock 502 of method 500, the nodes may be physical machines and/or VMs.

In block 503, the main node of the application is determined, and remotenetwork endpoints and protocols used to communicate by the applicationare identified based on the main node. The main application componentsmay be identified by examining the processes of the application byapplication analyzer 403A. A main node where a core part of theapplication is running is also identified. For example, a Hadoop clusterwill have its NameNode as main node, while a simple three tier web basedapplication will have its application hosting middleware server node asthe main component. The main node may be a physical machine or a VM invarious embodiments. Once the main node is identified, the coreframework hosting the application on main node is identified, andconfiguration file(s) on the main node may be inspected determinecommunication network and protocol information for the application. Theinternet protocol (IP) address of each of the nodes hosting a componentof the distributed application is also identified, as well as thecommunications protocols used to communicate between components. Thestorage used by each individual component of the application is alsoidentified in block 503. Various composite application monitoring anddiagnosis tools, such as IBM Tivoli Monitoring™ or IBM Tivoli CompositeApplication Monitor (ITCAM)™, may be used in blocks 502 and 503 todetermine the components of a composite application, and monitorinternal calls within the application to estimate the communicationpatterns among application components. Both static analysis and dynamicanalysis of the application environment is performed to determine how tomigrate the application to a container-based environment.

In block 504, the information gathered in blocks 502 and 503 isconsolidated by application analyzer 403A, with nodes and the particularsoftware on each node corresponding to the application being identified,along with software configuration. In block 505, the applicationanalyzer 403A generates a descriptor the application topology of thedistributed application based on the consolidated information of block504. The application topology descriptor may be an XML document in someembodiments. The nodes that are listed in the descriptor may be physicalmachines and/or VMs in various embodiments.

FIG. 6 depicts an embodiment of a method 600 for container migrationbased on the application topology. Method 600 may be implemented incontainerization planner 403B and plan executor 403C in containermigration module 402 in in container management server 401 of FIG. 1.First, in block 601, software packages, including version numbers, ofthe various components of the distributed application are identifiedbased on the application descriptor that was generated by method 500 ofFIG. 5. Next, in block 602, container image repositories, such as thepublic container image repository 405 and the private container imagerepository 406 of FIG. 4, are searched for existing container images forthe identified software packages. It is determined in block 603 whetheran existing image was found in block 602. If it is determined in block603 that an existing container image was found, flow proceeds from block603 to block 604, in which the existing container image that was foundin the repository is used. If it is determined in block 603 that noexisting image was found, flow proceeds from block 603 to block 605, inwhich the containerization planner 403B generates a new container imagefor the distributed application. Both of blocks 604 and 605 may beexecuted for a multi-container application. Flow proceeds from both ofblocks 604 and 605 to block 606. In block 606, storage criteria aregenerated for each container of the application, and networkconnectivity criteria are generated for inter-container communicationsby the application. Lastly, in block 607, the containerization plan,including the container images and storage and network connectivitycriteria, is output by the containerization planner 403B to the planexecutor 403C, and the plan executor 403C builds and interconnects thecontainers for the distributed application based on the containerizationplan. In some embodiments, the containerization planner 403B may mergetwo or more containers of the application into a single container in thecontainerization plan if the two or more containers communicatefrequently (e.g., exceeding a predefined threshold). Various otherinfrastructure characteristics (e.g., machine ping statistics or layout)may be used to determine the containerization plan (e.g., if pairwiselatency between nodes exceeding a predetermined threshold, use abin-packing strategy to pack all components of the application into areduced number of containers, subject to resource constraints). Thecontainers are deployed on underlying infrastructure of the system 400,and network connections among the containers are configured. Variouspredefined rules may be used to determine the container packagingconfiguration in block 607, e.g., if components A and B communicate witheach other more than 10 times within one minute (on average) and thedelay exceeds 50 milliseconds, A and B should be packaged in a singlecontainer. Otherwise, separate containers may be used for components Aand B to protect modularity and reusability.

FIG. 7 depicts an embodiment of a method 700 for collection ofapplication analysis data for container provisioning. Method 700 may beimplemented in container provisioning module 404 in container managementserver 401 of FIG. 4. First, in block 701, the system 400 is monitored,and an inventory of the various containers, such as containers 411A-Nand containers 413A-N, are collected. Then, in block 702, the collecteddata is analyzed to determine communications traffic patterns among thecontainers. For example, if a user already has a Hadoop service runningin the system 400, the traffic characteristics such as delay and jitteramong the various components of the Hadoop service are analyzed. Lastly,in block 703, the analyzed data is stored in, for example, the containermanagement server 401.

FIG. 8 an embodiment of a method 800 for container provisioning inaccordance with an embodiment. Method 800 may be implemented incontainer provisioning module 404 in container management server 401 ofFIG. 4. In block 801, a user creates a new application based oncontainers. Next, in block 802, the application analysis data that wasstored in block 703 of FIG. 7 is searched for analysis datacorresponding to the application. In block 803, it is determined whetheranalysis data was found for the application in block 802. If analysisdata for the application was not found in block 802, then flow proceedsfrom block 803 to block 807, which is discussed below. If analysis datafor the application was found in block 502, then flow proceeds fromblock 803 to block 804, in which the private container image repository406 is searched for an image corresponding to the application. In block805, if it is determined that an image corresponding to the applicationwas found in the private container image repository in block 804, flowproceeds from block 805 to block 806. In block 806, containers for theapplication are generated based on the analysis data that was found inblock 803 and the image that was found in block 804.

If it was determined in block 805 that an image corresponding to theapplication was not found in the private container image repository 406,and flow proceeds from block 805 to block 807. In block 807, the publiccontainer image repository 405 is searched for a container imagecorresponding to the application. Rule-based application componenttraffic pattern best practices may also be retrieved for the applicationin block 807. Then, in block 808, the container image that was found inblock 807 in the public container image repository 405, along with anyanalysis data or best practices that were found corresponding to theapplication, is used to generate the one or more containers for theapplication. Also, the image from the public container image repository405 is added to the private container image repository 406 in block 807.In some embodiments, multiple options for containerizing the applicationare presented to a user in block 808, the user may select a preferredoption, and the one or more container(s) for the application aregenerated based on the selected option.

In an example of a search of a public container image repository 405, asis performed in block 807, population-level container buildingstatistics may be queried and then predefined rules (based on, forexample, communication patterns and network latencies) may be used togenerate recommendations for specific local container building. Forexample, the container provisioning module 404 may query the publiccontainer image repository 405 in block 807 about the most common waysthat the specific application has historically been packaged, e.g., thepublic container image repository 105 may indicate that more than 80% ofthe Hadoop related containers were built with all NameNode and DataNodesin separate containers. The container provisioning module 104 canprovide this information to the user in block 808, and let user tochoose whether to use the popular packaging solution or a defaultsolution, which may be to pack everything in a single container. The oneor more containers for the application are then generated based on theoption that was selected by the user. The one or more containers may beprovisioned on one or more nodes, and the nodes may comprise physicalmachines and/or VMs in various embodiments.

Technical effects and benefits include automated migration ofapplications to container-based environments.

The present invention may be a system, a method, and/or a computerprogram product. The computer program product may include a computerreadable storage medium (or media) having computer readable programinstructions thereon for causing a processor to carry out aspects of thepresent invention.

The computer readable storage medium can be a tangible device that canretain and store instructions for use by an instruction executiondevice. The computer readable storage medium may be, for example, but isnot limited to, an electronic storage device, a magnetic storage device,an optical storage device, an electromagnetic storage device, asemiconductor storage device, or any suitable combination of theforegoing. A non-exhaustive list of more specific examples of thecomputer readable storage medium includes the following: a portablecomputer diskette, a hard disk, a random access memory (RAM), aread-only memory (ROM), an erasable programmable read-only memory (EPROMor Flash memory), a static random access memory (SRAM), a portablecompact disc read-only memory (CD-ROM), a digital versatile disk (DVD),a memory stick, a floppy disk, a mechanically encoded device such aspunch-cards or raised structures in a groove having instructionsrecorded thereon, and any suitable combination of the foregoing. Acomputer readable storage medium, as used herein, is not to be construedas being transitory signals per se, such as radio waves or other freelypropagating electromagnetic waves, electromagnetic waves propagatingthrough a waveguide or other transmission media (e.g., light pulsespassing through a fiber-optic cable), or electrical signals transmittedthrough a wire.

Computer readable program instructions described herein can bedownloaded to respective computing/processing devices from a computerreadable storage medium or to an external computer or external storagedevice via a network, for example, the Internet, a local area network, awide area network and/or a wireless network. The network may comprisecopper transmission cables, optical transmission fibers, wirelesstransmission, routers, firewalls, switches, gateway computers and/oredge servers. A network adapter card or network interface in eachcomputing/processing device receives computer readable programinstructions from the network and forwards the computer readable programinstructions for storage in a computer readable storage medium withinthe respective computing/processing device.

Computer readable program instructions for carrying out operations ofthe present invention may be assembler instructions,instruction-set-architecture (ISA) instructions, machine instructions,machine dependent instructions, microcode, firmware instructions,state-setting data, or either source code or object code written in anycombination of one or more programming languages, including an objectoriented programming language such as Smalltalk, C++ or the like, andconventional procedural programming languages, such as the “C”programming language or similar programming languages. The computerreadable program instructions may execute entirely on the user'scomputer, partly on the user's computer, as a stand-alone softwarepackage, partly on the user's computer and partly on a remote computeror entirely on the remote computer or server. In the latter scenario,the remote computer may be connected to the user's computer through anytype of network, including a local area network (LAN) or a wide areanetwork (WAN), or the connection may be made to an external computer(for example, through the Internet using an Internet Service Provider).In some embodiments, electronic circuitry including, for example,programmable logic circuitry, field-programmable gate arrays (FPGA), orprogrammable logic arrays (PLA) may execute the computer readableprogram instructions by utilizing state information of the computerreadable program instructions to personalize the electronic circuitry,in order to perform aspects of the present invention

Aspects of the present invention are described herein with reference toflowchart illustrations and/or block diagrams of methods, apparatus(systems), and computer program products according to embodiments of theinvention. It will be understood that each block of the flowchartillustrations and/or block diagrams, and combinations of blocks in theflowchart illustrations and/or block diagrams, can be implemented bycomputer readable program instructions.

These computer readable program instructions may be provided to aprocessor of a general purpose computer, special purpose computer, orother programmable data processing apparatus to produce a machine, suchthat the instructions, which execute via the processor of the computeror other programmable data processing apparatus, create means forimplementing the functions/acts specified in the flowchart and/or blockdiagram block or blocks. These computer readable program instructionsmay also be stored in a computer readable storage medium that can directa computer, a programmable data processing apparatus, and/or otherdevices to function in a particular manner, such that the computerreadable storage medium having instructions stored therein comprises anarticle of manufacture including instructions which implement aspects ofthe function/act specified in the flowchart and/or block diagram blockor blocks.

The computer readable program instructions may also be loaded onto acomputer, other programmable data processing apparatus, or other deviceto cause a series of operational steps to be performed on the computer,other programmable apparatus or other device to produce a computerimplemented process, such that the instructions which execute on thecomputer, other programmable apparatus, or other device implement thefunctions/acts specified in the flowchart and/or block diagram block orblocks.

The flowchart and block diagrams in the Figures illustrate thearchitecture, functionality, and operation of possible implementationsof systems, methods, and computer program products according to variousembodiments of the present invention. In this regard, each block in theflowchart or block diagrams may represent a module, segment, or portionof instructions, which comprises one or more executable instructions forimplementing the specified logical function(s). In some alternativeimplementations, the functions noted in the block may occur out of theorder noted in the figures. For example, two blocks shown in successionmay, in fact, be executed substantially concurrently, or the blocks maysometimes be executed in the reverse order, depending upon thefunctionality involved. It will also be noted that each block of theblock diagrams and/or flowchart illustration, and combinations of blocksin the block diagrams and/or flowchart illustration, can be implementedby special purpose hardware-based systems that perform the specifiedfunctions or acts or carry out combinations of special purpose hardwareand computer instructions.

The descriptions of the various embodiments of the present inventionhave been presented for purposes of illustration, but are not intendedto be exhaustive or limited to the embodiments disclosed. Manymodifications and variations will be apparent to those of ordinary skillin the art without departing from the scope and spirit of the describedembodiments. The terminology used herein was chosen to best explain theprinciples of the embodiments, the practical application or technicalimprovement over technologies found in the marketplace, or to enableothers of ordinary skill in the art to understand the embodimentsdisclosed herein.

What is claimed is:
 1. A computer implemented method for containermigration and provisioning, the method comprising: receiving, by acontainer migration module of a container management server, a requestto migrate a composite application to a container-based environment;determining, by an application analyzer of the container migrationmodule, a plurality of software components that make up the compositeapplication; determining, by the application analyzer, communicationspatterns between the plurality of software components; determining, by acontainerization planner of the container migration module, acontainerization plan for the composite application based on thedetermined communications patterns; and creating, by a plan executor ofthe container migration module, a plurality of containers, andcommunications channels between the plurality of containers, for thesoftware components of the composite application based on thecontainerization plan.
 2. The method of claim 1, wherein the pluralityof software components and the communications patterns between theplurality of software components are determined based on at least one ofa best practice knowledge base, a user-provided descriptor, and anautomated application monitoring tool.
 3. The method of claim 1, whereinthe containerization plan is further generated based on one or moreinfrastructure characteristics of a data center in which the containermanagement server is located.
 4. The method of claim 3, wherein the oneor more infrastructure characteristics includes ping times betweencomputer systems of the data center, and wherein, based on a ping timebeing greater than a threshold, two or more of the software componentsare merged into a single container.
 5. The method of claim 1, furthercomprising, based on receiving a request for a new applicationcontainer: monitoring containerization schemes in a data center by acontainer provisioning module of the container management server; andstoring containerization data collected by the monitoring in a privatecontainer image repository of the data center.
 6. The method of claim 5,further comprising, based on receiving a request to generate a newcontainer, determining a containerization scheme for the new containerbased on the stored containerization data by the container provisioningmodule.
 7. The method of claim 6, further comprising accessingadditional containerization data stored in a global container imagerepository in order to determine the containerization scheme for the newcontainer, wherein the additional containerization data comprises dataregarding containerization schemes across a plurality of data centers.8. The method of claim 5, wherein the containerization data comprisescommunications patterns and latency between application components inthe data center.
 9. A computer program product for implementingcontainer migration and provisioning, the computer program productcomprising: a computer readable storage medium having programinstructions embodied therewith, the program instructions readable by aprocessing circuit to cause the processing circuit to perform a methodcomprising: receiving a request to migrate a composite application to acontainer-based environment; determining a plurality of softwarecomponents that make up the composite application; determiningcommunications patterns between the plurality of software components;determining a containerization plan for the composite application basedon the determined communications patterns; and creating a plurality ofcontainers, and communications channels between the plurality ofcontainers, for the software components of the composite applicationbased on the containerization plan.
 10. The computer program product ofclaim 9, wherein the plurality of software components and thecommunications patterns between the plurality of software components aredetermined based on at least one of a best practice knowledge base, auser-provided descriptor, and an automated application monitoring tool.11. The computer program product of claim 9, wherein thecontainerization plan is further generated based on one or moreinfrastructure characteristics of a data center in which the containermanagement server is located.
 12. The computer program product of claim11, wherein the one or more infrastructure characteristics includes pingtimes between computer systems of the data center, and wherein, based ona ping time being greater than a threshold, two or more of the softwarecomponents are merged into a single container.
 13. The computer programproduct of claim 9, further comprising, based on receiving a request fora new application container: monitoring containerization schemes in adata center; and storing containerization data collected by themonitoring in a private container image repository of the data center.14. The computer program product of claim 13, further comprising, basedon receiving a request to generate a new container, determining acontainerization scheme for the new container based on the storedcontainerization data.
 15. The computer program product of claim 14,further comprising accessing additional containerization data stored ina global container image repository in order to determine thecontainerization scheme for the new container, wherein the additionalcontainerization data comprises data regarding containerization schemesacross a plurality of data centers.
 16. A computer system for containermigration and provisioning, the system comprising: a memory; and aprocessor, communicatively coupled to said memory, the computer systemconfigured to perform a method comprising: receiving a request tomigrate a composite application to a container-based environment;determining a plurality of software components that make up thecomposite application; determining communications patterns between theplurality of software components; determining a containerization planfor the composite application based on the determined communicationspatterns; and creating a plurality of containers, and communicationschannels between the plurality of containers, for the softwarecomponents of the composite application based on the containerizationplan.
 17. The system of claim 16, wherein the plurality of softwarecomponents and the communications patterns between the plurality ofsoftware components are determined based on at least one of a bestpractice knowledge base, a user-provided descriptor, and an automatedapplication monitoring tool.
 18. The system of claim 16, wherein thecontainerization plan is further generated based on one or moreinfrastructure characteristics of a data center in which the containermanagement server is located.
 19. The system of claim 18, wherein theone or more infrastructure characteristics includes ping times betweencomputer systems of the data center, and wherein, based on a ping timebeing greater than a threshold, two or more of the software componentsare merged into a single container.
 20. The system of claim 16, furthercomprising, based on receiving a request for a new applicationcontainer: monitoring containerization schemes in a data center; andstoring containerization data collected by the monitoring in a privatecontainer image repository of the data center.